<?php
/**
 * Created by JetBrains PhpStorm.
 * User: dodasso
 * Date: 7/21/13
 * Time: 7:33 PM
 * To change this template use File | Settings | File Templates.
 */

namespace common;


class Errors {
    // Error messages.
    public $INTEGRAL_ERR_MSG = array();

    // General errors.
    const INTEGRAL_ERR_NONE                                         = 0;
    const INTEGRAL_ERR_FAIL                                         = 1;
    const INTEGRAL_ERR_INVALID_PARAMETERS                           = 2;
    const INTEGRAL_ERR_METHOD_NOT_ALLOWED                           = 3;
    const INTEGRAL_ERR_INVALID_JSON                                 = 4;

    // Common errors
    const INTEGRAL_ERR_COMMON_NOT_INITIALIZED                       = 1000;
    const INTEGRAL_ERR_COMMON_MODULE_INVALID_STATUS                 = 1001;
    const INTEGRAL_ERR_COMMON_UNABLE_TO_LIST_LINE_OF_BUSSINESS      = 1008;
    const INTEGRAL_ERR_COMMON_UNABLE_TO_LIST_MEASURING_UNITS        = 1009;

    // Persistance errors
    const INTEGRAL_ERR_PERSISTANCE_NOT_INITIALIZED                  = 2000;
    const INTEGRAL_ERR_PERSISTANCE_CANNOT_CREATE_CONNECTOR          = 2001;
    const INTEGRAL_ERR_PERSISTANCE_NOT_CONNECTED                    = 2002;
    const INTEGRAL_ERR_PERSISTANCE_ALREADY_CONNECTED                = 2003;
    const INTEGRAL_ERR_PERSISTANCE_UNABLE_TO_READ                   = 2004;
    const INTEGRAL_ERR_PERSISTANCE_UNABLE_TO_CREATE                 = 2005;
    const INTEGRAL_ERR_PERSISTANCE_UNABLE_TO_DELETE                 = 2006;
    const INTEGRAL_ERR_PERSISTANCE_UNABLE_TO_UPDATE                 = 2007;
    const INTEGRAL_ERR_PERSISTANCE_UNABLE_TO_MAP_OBJECT             = 2008;
    const INTEGRAL_ERR_PERSISTANCE_NOT_FOUND                        = 2009;

    // Inventory errors
    const INTEGRAL_ERR_INVENTORY_NOT_INITIALIZED                    = 3000;
    const INTEGRAL_ERR_INVENTORY_UNABLE_TO_FIND_INVENTORY_OBJECT    = 3001;
    const INTEGRAL_ERR_INVENTORY_UNABLE_TO_LIST_MOVEMENT_TYPES      = 3002;
    const INTEGRAL_ERR_INVENTORY_UNABLE_TO_LIST_INVENTORY_OBJECTS   = 3003;

    // Session errors
    const INTEGRAL_ERR_SESSION_NOT_INITIALIZED                      = 4000;
    const INTEGRAL_ERR_SESSION_INVALID_PASSWORD                     = 4001;
    const INTEGRAL_ERR_SESSION_NOT_AUTHORIZED                       = 4002;
    const INTEGRAL_ERR_SESSION_UNABLE_TO_LOGIN                      = 4003;
    const INTEGRAL_ERR_SESSION_UNABLE_TO_LOGOUT                     = 4004;
}